package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class UnicodeCharacterStringLiteral implements GeneralLiteral {

    private int beginIndex;
    private int endIndex;
    private boolean introducer;
    private CharacterSetName characterSetSpecification;
    private List<String> contentList;
    private String escapeCharacter;

    public UnicodeCharacterStringLiteral(int beginIndex,
                                         int endIndex,
                                         boolean introducer,
                                         CharacterSetName characterSetSpecification,
                                         List<String> contentList,
                                         String escapeCharacter) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.introducer = introducer;
        this.characterSetSpecification = characterSetSpecification;
        this.contentList = contentList;
        this.escapeCharacter = escapeCharacter;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public boolean isIntroducer() {
        return introducer;
    }

    public CharacterSetName getCharacterSetSpecification() {
        return characterSetSpecification;
    }

    public int contentSize() {
        return contentList.size();
    }

    public String getContent(int index) {
        return contentList.get(index);
    }

    public String getEscapeCharacter() {
        return escapeCharacter;
    }

}
